<template>
   <ul v-show="todos.length" class="todo-main">
        <!-- <UserItem v-for="(todo) in todos" :key="todo.id" :id="todo.id"  :title="todo.title" :done="todo.done"/> -->
        <UserItem 
            v-for="(todo) in todos" 
            :key="todo.id" 
            :revamp="revamp" 
            :del="del" 
            :todo="todo"
        />
    </ul>
</template>

<script>
import UserItem from './UserItem.vue'

    export default {
        name:'UserList',
        
        // 注册组件
        components:{
            UserItem,
        },
        props:['todos','revamp','del']
    }
</script>

<style scoped>
    /*main*/
    .todo-main {
    margin-left: 0px;
    border: 1px solid #ddd;
    border-radius: 2px;
    padding: 0px;
    }

    .todo-empty {
    height: 40px;
    line-height: 40px;
    border: 1px solid #ddd;
    border-radius: 2px;
    padding-left: 5px;
    margin-top: 10px;
    }
</style>